package com.example.admin.yuejian_22.Fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;

import com.example.admin.yuejian_22.Listener.UserListener;
import com.example.admin.yuejian_22.R;

/**
 * Created by Admin on 2017/10/22.
 */

public class ClubDetail_CFragment  extends Fragment {
    private View view = null;
    public RecyclerView recyclerView;
    private UserListener userListener = new UserListener() {
        @Override
        public void onResponse(Object beanobject) {
           //===============
        }

        @Override
        public void onFail(String msg) {
            Toast.makeText(getActivity(), ""+msg, Toast.LENGTH_SHORT).show();
        }
    };

    public  void initRecyclerView(View view){
        recyclerView = (RecyclerView)view.findViewById(R.id.lv_club_course);
        recyclerView.setLayoutManager(new LinearLayoutManager(this.getActivity()));
        recyclerView.setItemAnimator(new DefaultItemAnimator());
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.listview_club, container, false);
        initRecyclerView(view);

        //========================

        return view;
    }
}
